package com.tianji.coupon.controller;


import com.tianji.common.Result;
import com.tianji.coupon.query.CouponQuery;
import com.tianji.coupon.service.ExchangeCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 兑换码 前端控制器
 * </p>
 *
 * @author 陈佳
 * @since 2024-08-29
 */
@RestController
@RequestMapping("/exchangeCode")
@RequiredArgsConstructor
@Api("兑换码相关接口")
public class ExchangeCodeController {
    private final ExchangeCodeService exchangeCodeService;
    @ApiOperation("分页查询兑换码接口")
    @GetMapping("/page")
    public Result queryByPage(CouponQuery query){
        return exchangeCodeService.queryCouponByPage(query);
    }
}

